'''
名称：娃娃鱼自动化运维-增加mac地址绑定，传参 ip mac
作者：颜涛
时间：2018/5/19
'''
#引入模块
import sys,time
import ssh as sshs
host = '192.168.4.1'
username = 'admin1234'
password = '**********'
if len(sys.argv) != 2:
    print("参数未传递或参数不正确，请传递参数")
    print("即将退出程序")
    time.sleep(5)
else:
    ip = sys.argv[1]
    mac = sys.argv[2]
    sshs.update(host, username, password,ip,mac)
    print("True:" + ip + '-' + mac)
    print("增加MAC地址处理完毕")
    print("即将退出程序")
    time.sleep(5)
